package model;

public class DeplacementAction extends Action {

	private int toX, toY;
	private int interceptX, interceptY;
	
	
	public DeplacementAction(int idU, int toX, int toY) {
		super(idU);
		this.toX = toX;
		this.toY = toY;
		this.interceptX = -1;
		this.interceptY = -1;
	}
	
	public DeplacementAction(int idU, int toX, int toY, int interceptX, int interceptY) {
		this(idU, toX, toY);
		this.interceptX = interceptX;
		this.interceptY = interceptY;
	}

	public int getToX() {
		return toX;
	}

	public int getToY() {
		return toY;
	}
	
	public int getInterceptY() {
		return interceptY;
	}

	public int getInterceptX() {
		return interceptX;
	}
	
	public void setInterceptPos(int x, int y) {
		this.interceptX = x;
		this.interceptY = y;
	}

	public boolean isIntercepted() {
		return interceptX!=-1 && interceptY!=-1;
	}

}
